# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=thc-ssl-dos
pkgver=1.4
pkgrel=12
groups=('blackarch' 'blackarch-dos')
pkgdesc='A tool to verify the performance of SSL. To be used in your authorized and legitimate area ONLY. You need to accept this to make use of it, no use for bad intentions, you have been warned!'
url='http://www.thc.org/thc-ssl-dos/'
arch=('x86_64' 'aarch64')
license=('custom:unknown')
depends=('openssl' 'glibc' 'zlib')
makedepends=('git')
source=('git+https://github.com/BlackArch/thc-ssl-dos.git'
        'remove-skiddie-check.diff')
sha512sums=('SKIP'
            '5914b19d77b71d731e997d9d8160c1b1ea63712828c1a4360ff4c80fef29b5c493ff25ff69ff8055b1a1c14dbf3334970940bd719df8cf8cc83fbafd63321a80')

prepare() {
  cd "$pkgname/src"

  patch < "$srcdir/remove-skiddie-check.diff"
}

build() {
  cd $pkgname

  if [[ "$CARCH" == "i686" || "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr
  else
    ./configure --build=arm --prefix=/usr
  fi

  make all
}

package() {
  cd $pkgname

  install -Dm 755 "src/$pkgname" "$pkgdir/usr/bin/$pkgname"
}

